<template>
  <div>
    <h1>管理员仪表盘</h1>
    <p>欢迎，您已成功登录为管理员。</p>
    <el-button @click="logout">退出登录</el-button>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router';

const router = useRouter();

const logout = () => {
  sessionStorage.removeItem('token');
  sessionStorage.removeItem('role');
  router.push({ name: 'Home' });
};
</script>

<style scoped>
</style>    